<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Message Board</title>
</head>

<!-- Bootstrap core CSS -->

<link href="http://v3.bootcss.com/dist/css/bootstrap.min.css" rel="stylesheet">


  <!-- Optional Bootstrap Theme -->

  <link href="data:text/css;charset=utf-8," data-href="http://v3.bootcss.com/dist/css/bootstrap-theme.min.css" rel="stylesheet" id="bs-theme-stylesheet">


<style type="text/css">
	.top{
		position: relative;
	}
	.row2{
		margin-top: 25px;
	}
</style>
<body>
	    <div class="navbar navbar-inverse navbar-fixed-top top">
      <div class="container">
        <div class="navbar-header">
          <a class="navbar-brand hidden-sm" href="index.php" onclick="_hmt.push(['_trackEvent', 'navbar', 'click', 'navbar-首页'])">留言板</a>
        </div>
        <div class="navbar-collapse collapse" role="navigation">
          <ul class="nav navbar-nav">
            <li class="hidden-sm hidden-md"><a href="index.php"  target="_blank" onclick="_hmt.push(['_trackEvent', 'navbar', 'click', 'v2doc'])">Message Board</a></li>
          </ul>
        </div>
      </div>
    </div>
	<div class="bs-docs-header" id="content" tabindex="-1">
     	<div class="container">
		<header class="jumbotron subhead">
		  <div class="container">
		    <h1>你有什么想说的吗</h1>
		  </div>
		</header>
	</div>
    
	<div class="row">
	<div class="col-md-1"></div>
	    <div class="col-md-10">
                <form class="form-inline" method="post" action="./add.php">
                    <div class="col-md-12">
                     <div class="form-group">
                     <label for="exampleInputName2">用户名</label>
                    <input type="text" class="form-control" id="exampleInputName2"name="username" placeholder="Jane Doe">
                         </div>
              <button type="submit" class="btn btn-success">留言</button>
          </div>
          <div class="col-md-12">
            <textarea class="form-control content" name="content" rows="3"></textarea>
          </div>
        </form>
        </div>
	  <div class="col-md-1"></div>
	</div>
	<div class="row2">
	<div class="col-md-1"></div>
	  <div class="col-md-10">
		 	<?php foreach ($db as $k => $v) { ?>
                <div class="alert <?php echo $color[array_rand($color)]; ?>" role="alert">
              <a href="#" class="alert-link"><?php echo $v['username']; ?></a>
              <p><?php echo $v['content']; ?></p>
              <p><?php echo date('Y-m-d H:i:s',$v['create_time']) ?></p>
            </div>
            <?php } ?>
		</div>
	  <div class="col-md-1"></div>
	</div>
    
	
	


</body>
</html>